﻿using System;

namespace Simp.CodeModel.CoreFunctions
{
	/// <summary>Encapsulates the boolean value <c>true</c>.</summary>
	public class TrueFunction : ParameterLessFunctionBase, IFunctionSerializer
	{
		#region IFunctionSerializer Members
		void IFunctionSerializer.Serialize(AppendOnlyStringBuilder builder, params IFunction[] parameters)
		{
			builder.Append(FunctionName);
		}
		#endregion

		/// <summary>See <see cref="IFunction.FunctionName"/>.</summary>
		public override string FunctionName
		{
			get { return "True"; }
		}

		/// <summary>See <see cref="IFunction.AcceptVisitor"/>.</summary>
		/// <param name="visitor"></param>
		/// <returns></returns>
		public override IFunction AcceptVisitor(IFunctionVisitor visitor)
		{
			return null;
		}

		/// <summary>See <see cref="IFunction.Simplify"/>.</summary>
		/// <param name="simplificationMode"/>
		/// <returns></returns>
		protected override IFunction Simplify(SimplificationMode simplificationMode)
		{
			return null;
		}
	}
}